<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/information.png" alt="" /> <?php echo $heading_title; ?></h1>
      <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><?php echo $button_cancel; ?></a></div>
    </div>
    <div class="content">
      <div id="tabs" class="htabs"><a href="#tab-data"><?php echo $tab_data; ?></a><a href="#tab-general"><?php echo $tab_general; ?></a></div>
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
        <div id="tab-data">
          <table class="form">
            <tr>
              <td><?php echo $entry_info_type; ?></td>
              <td><select name="info_type">
                  <option value="common" <?php if($info_type == "common"){ echo "selected=\"selected\"";} ?>>common</option>
                  <option value="help" <?php if($info_type == "help"){ echo "selected=\"selected\"";} ?>>help</option>
                  <option value="myAccount" <?php if($info_type == "myAccount"){ echo "selected=\"selected\"";} ?>>myAccount</option>
                  <option value="review" <?php if($info_type == "review"){ echo "selected=\"selected\"";} ?>>review</option>
                </select></td>
            </tr>
            <tr>
              <td><?php echo $entry_layout; ?></td>
              <td class="left"><select name="layout_id">
                    <option value="0" <?php if($layout_id == "0"){ echo "selected=\"selected\"";} ?>></option>
                    <?php foreach ($layouts as $layout) { ?>
                    <option value="<?php echo $layout['layout_id']; ?>" <?php if($layout_id == $layout['layout_id']){ echo "selected=\"selected\"";} ?>><?php echo $layout['name']; ?></option>
                    <?php } ?>
                  </select></td>
            </tr>
            <tr>
              <td><?php echo $entry_status; ?></td>
              <td>
              <?php if ($status) { ?>
                  <input name="status" type="radio" value="1" checked="checked"/><?php echo $text_enabled; ?>
                  <input name="status" type="radio" value="0"/><?php echo $text_disabled; ?>
              <?php } else { ?>
                  <input name="status" type="radio" value="1"/><?php echo $text_enabled; ?>
                  <input name="status" type="radio" value="0" checked="checked"/><?php echo $text_disabled; ?>
              <?php } ?>
			  </td>
            </tr>
          </table>
        </div>
        <div id="tab-general">
          <div id="languages" class="htabs">
            <?php foreach ($languages as $language) { ?>
            <a href="#language<?php echo $language['language_id']; ?>"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a>
            <?php } ?>
          </div>
          <?php foreach ($languages as $language) { ?>
          <div id="language<?php echo $language['language_id']; ?>">
            <table class="form">
              <tr>
                <td><span class="required">*</span> <?php echo $entry_title; ?></td>
                <td><input type="hidden" name="information_description[<?php echo $language['language_id']; ?>][information_id]" value="<?php echo isset($information_description[$language['language_id']]) ? $information_description[$language['language_id']]['information_id'] : '0'; ?>" />
                  <input type="text" name="information_description[<?php echo $language['language_id']; ?>][title]" size="100" value="<?php echo isset($information_description[$language['language_id']]) ? $information_description[$language['language_id']]['title'] : ''; ?>" /></td>
              </tr>
              <tr>
                <td><span class="required">*</span> <?php echo $entry_description; ?></td>
                <td><textarea name="information_description[<?php echo $language['language_id']; ?>][description]" id="description<?php echo $language['language_id']; ?>"><?php echo isset($information_description[$language['language_id']]) ? $information_description[$language['language_id']]['description'] : ''; ?></textarea></td>
              </tr>
            </table>
          </div>
          <?php } ?>
        </div>
      </form>
    </div>
  </div>
</div>
<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script> 
<script type="text/javascript"><!--
<?php foreach ($languages as $language) { ?>
CKEDITOR.replace('description<?php echo $language['language_id']; ?>', {
	filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
<?php } ?>
//--></script> 
<script type="text/javascript"><!--
$('#tabs a').tabs(); 
$('#languages a').tabs(); 
//--></script> 
<?php echo $footer; ?>